package com.novunda.platform.repositories;

import com.novunda.cas.push.client.client.ThirdCasClient;
import com.novunda.cas.push.client.response.ApprovePushResponse;
import com.novunda.cas.push.client.response.CommonResponse;
import org.springframework.stereotype.Repository;

/**
 * ..
 * 转发推送
 *
 * @author yangg
 * @since 2016/10/13.
 */
@Repository
public class PushRepository {
    /**
     * 普通推送
     *
     * @param sender   发送者
     * @param receiver 接收者
     * @param title    标题
     * @param content  内容
     * @return 推送结果
     */
    public CommonResponse normalPush(String sender, String receiver, String title, String content) {
        return ThirdCasClient.normalPush(receiver, sender, title, content);
    }

    /**
     * 普通推送
     *
     * @param sender   发送者
     * @param receiver 接收者
     * @param title    标题
     * @param content  内容
     * @return 推送结果
     */
    public ApprovePushResponse approvePush(String sender, String receiver, String title, String content) {
        return ThirdCasClient.approvePush(receiver, sender, title, content);
    }

    /**
     * 广播
     *
     * @param sender  发送者
     * @param title   标题
     * @param content 内容
     * @return 推送结果
     */
    public CommonResponse broadCast(String sender, String title, String content) {
        return ThirdCasClient.broadCast(sender, title, content);
    }


}
